function bishopAndPawn(bishop, pawn) {
    var s = 'abcdegh';
    var b_x = s.indexOf(bishop[0]);
    var b_y = +bishop[1] - 1;
    var p_x = s.indexOf(pawn[0]);
    var p_y = +pawn[1] - 1;
    return b_y - b_x === p_y - p_x || b_y + b_x === p_y + p_x
}